home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 04 - 1988 / 04.02 Feb 88 / c postcard / PostCard.r < prev   
Encoding:
Text File  |  1987-10-13  |  4.3 KB  |  335 lines  |  [TEXT/KAHL]

  1. * resource file for PostCard.c
  2. * by Joel McNamara
  3. * for MacTutor Magazine
  4. * October 12, 1987
  5.  
  6. Development:MacTutor:PostCard proj.Rsrc
  7. * you'll probably want to change the pathname
  8.  
  9. * the bundles, first for PostCard then PaintDisplay
  10. Type BNDL
  11. ,128
  12. PCRD 0
  13. ICN#
  14. 0 128
  15. FREF
  16. 0 128
  17.  
  18. * this BNDL will be renumbered by the application
  19. ,129
  20. PDIS 0
  21. ICN#
  22. 0 128
  23. FREF
  24. 0 128
  25.  
  26.  
  27. * we'll use the same FREF for both
  28. Type FREF
  29. ,128
  30. APPL 0
  31.  
  32.  
  33. * PostCard file type
  34. Type PCRD = STR 
  35. ,0
  36. PostCard Version 1.0 - 12 Oct 87
  37.  
  38.  
  39. * PaintDISplay file type
  40. Type PDIS = STR 
  41. ,0
  42. PaintDisplay Version 1.0 - 12 Oct 87
  43.  
  44.  
  45. * der menu
  46. Type MENU
  47. ,1
  48. \14
  49. About PostCard...
  50. (-
  51.  
  52. ,255
  53. File
  54. Quit
  55.  
  56. ,256
  57. Commands
  58. Make a PostCard...
  59. (-
  60. Help...
  61.  
  62.  
  63. * now the application icon
  64. Type ICN# = GNRL
  65. ,128
  66. .H
  67. 00000000
  68. 00000000 
  69. 1FFFF800
  70. 20003C00 
  71. 20007C00
  72. 27FFFC00 
  73. 2401FC00
  74. 2553FC00 
  75. 2402F400
  76. 2545E400 
  77. 2409C400
  78. 25428400 
  79. 24010400
  80. 25420400 
  81. 24003F00
  82. 25084080 
  83. 24108040
  84. 23F13020 
  85. 2039C814
  86. 201E7F8F 
  87. 20023007
  88. 261F0007 
  89. 26008007
  90. 20006007 
  91. 3FFFFFE7
  92. 2000021F 
  93. 1FFFFC07
  94. 00000000 
  95. 00000000
  96. 00000000 
  97. 00000000
  98. 00000000
  99. * next the mask
  100. 00000000
  101. 00000000 
  102. 1FFFF800
  103. 3FFFFC00 
  104. 3FFFFC00
  105. 3FFFFC00 
  106. 3FFFFC00
  107. 3FFFFC00 
  108. 3FFFFC00
  109. 3FFFFC00 
  110. 3FFFFC00
  111. 3FFFFC00 
  112. 3FFFFC00
  113. 3FFFFC00 
  114. 3FFFFF00
  115. 3FFFFF80 
  116. 3FFFFFC0
  117. 3FFFFFE0 
  118. 3FFFFFF4
  119. 3FFFFFFF 
  120. 3FFFFFFF
  121. 3FFFFFFF 
  122. 3FFFFFFF
  123. 3FFFFFFF 
  124. 3FFFFFFF
  125. 3FFFFE1F 
  126. 1FFFFC07
  127. 00000000 
  128. 00000000
  129. 00000000 
  130. 00000000
  131. 00000000 
  132.  
  133. * now the stand alone file's icon
  134. ,129
  135. 00000000
  136. 00000000 
  137. 00000000
  138. 00000000 
  139. 00000000
  140. 00000000 
  141. 00000000
  142. 00000000 
  143. 00000000
  144. FFFFFFFF 
  145. 81D00001
  146. 81D000FD 
  147. 81F000AD
  148. 811000D5 
  149. 811000AD
  150. 811000D5 
  151. 811000FD
  152. 81100001 
  153. 80E00001
  154. 81F00001 
  155. 81F00001
  156. 81F80001 
  157. 81F80001
  158. 81E85FFF 
  159. 81F80BFF
  160. 80D03FFF 
  161. 80F0FFFF
  162. 80703FFF 
  163. 8019FFFF
  164. 80000001 
  165. FFFFFFFF
  166. 00000000
  167. * next the mask
  168. 00000000
  169. 00000000 
  170. 00000000
  171. 00000000 
  172. 00000000
  173. 00000000 
  174. 00000000
  175. 00000000 
  176. 00000000
  177. FFFFFFFF 
  178. FFFFFFFF
  179. FFFFFFFF 
  180. FFFFFFFF
  181. FFFFFFFF 
  182. FFFFFFFF
  183. FFFFFFFF 
  184. FFFFFFFF
  185. FFFFFFFF 
  186. FFFFFFFF
  187. FFFFFFFF 
  188. FFFFFFFF
  189. FFFFFFFF 
  190. FFFFFFFF
  191. FFFFFFFF 
  192. FFFFFFFF
  193. FFFFFFFF 
  194. FFFFFFFF
  195. FFFFFFFF 
  196. FFFFFFFF
  197. FFFFFFFF 
  198. FFFFFFFF
  199. 00000000 
  200.  
  201.  
  202. * the dialog items
  203. Type DITL
  204. ,255 (4)
  205. 2
  206.  
  207. button
  208. 48 272 66 349
  209. OK
  210.  
  211. staticText Disabled
  212. 6 11 43 350
  213. ^0
  214.  
  215. ,256 (4)
  216. 5
  217. button
  218. 171 86 190 178
  219. OK
  220.  
  221. staticText Disabled
  222. 2 86 20 177
  223. PostCard 1.0
  224.  
  225. staticText Disabled
  226. 24 13 87 263
  227. PostCard creates an application and then places a Paint file into the data fork, thus creating a stand alone viewer.
  228.  
  229. staticText Disabled
  230. 124 24 158 241
  231. Copyright 1987, Joel McNamara\0D         All Rights Reserved
  232.  
  233. staticText Disabled
  234. 100 50 118 208
  235. for MacTutor Magazine
  236.  
  237. ,257 (4)
  238. 4
  239. button
  240. 166 295 184 406
  241. OK
  242.  
  243. staticText Disabled
  244. 3 4 38 423
  245. PostCard takes a MacPaint document and turns it into a stand alone application that displays the upper left corner.
  246.  
  247. staticText Disabled
  248. 42 4 91 423
  249. When the Paint document is selected a new file is created with CODE resources (FAKE and DUMY - stored within the PostCard application) copied and renamed into the new file.
  250.  
  251.  
  252. staticText Disabled
  253. 95 4 161 423
  254. These resources drive the new application by reading its own data fork (copied in from the Paint file) and then displaying the bit mapped image.
  255.  
  256.  
  257. * the dialogs
  258. Type DLOG
  259. ,255 (4)
  260. message
  261. 60 68 136 438
  262. Visible NoGoAway
  263. 1
  264. 0
  265. 255
  266.  
  267. ,256 (4)
  268. about
  269. 52 122 252 394
  270. Visible NoGoAway
  271. 1
  272. 0
  273. 256
  274.  
  275. ,257 (4)
  276. help
  277. 46 48 242 474
  278. Visible NoGoAway
  279. 1
  280. 0
  281. 257
  282.  
  283.  
  284. * here's the trickery - we create new resources of type FAKE, and read
  285. * the CODE resources from PaintDisplay into them.
  286. Type FAKE = GNRL
  287. ,0
  288. .R
  289. Development:MacTutor:PaintDisplay CODE 0
  290. * you'll need to specify a different pathname above
  291.  
  292. ,1
  293. .R
  294. Development:MacTutor:PaintDisplay CODE 1
  295. * you'll need to specify a different pathname above
  296.  
  297. ,2
  298. .R
  299. Development:MacTutor:PaintDisplay CODE 2
  300. * you'll need to specify a different pathname above
  301.  
  302.  
  303. * now get the rest of the resources we need (as required by Lightspeed C) -
  304. * creating dummy resources named DUMY.
  305. Type DUMY = GNRL
  306. ,0
  307. .R
  308. Development:MacTutor:PaintDisplay CREL 2
  309. * you'll need to specify a different pathname above
  310.  
  311. ,1
  312. .R
  313. Development:MacTutor:PaintDisplay DATA 0
  314. * you'll need to specify a different pathname above
  315.  
  316. ,2
  317. .R
  318. Development:MacTutor:PaintDisplay DREL 0
  319. * you'll need to specify a different pathname above
  320.  
  321. ,3
  322. .R
  323. Development:MacTutor:PaintDisplay STRS 0
  324. * you'll need to specify a different pathname above
  325.  
  326. ,4
  327. .R
  328. Development:MacTutor:PaintDisplay ZERO 0
  329. * you'll need to specify a different pathname above
  330.  
  331.  
  332.  
  333.  
  334.  
  335.